import 'package:flutter/material.dart';
import 'package:flutter_shop/pages/home/tab_Index/index_recommond_data.dart';
import 'package:flutter_shop/pages/home/tab_Index/index_recommond_item_widget.dart';

class IndexRecommond extends StatelessWidget {
  final List<IndexRecommondItem> dataList;

  const IndexRecommond({Key key, this.dataList = indexRecommondItem})
      : super(key: key);
  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.all(10),
      child: Column(
        children: [
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: [
              Text('房屋推荐'),
              Text('房屋更多'),
            ],
          ),
          Padding(padding: EdgeInsets.all(5)),
          Wrap(
            spacing: 10,
            runSpacing: 10,
            children: dataList
                .map((item) => IndexRecommondItemWidget(data: item))
                .toList(),
          )
        ],
      ),
    );
  }
}
